package edu.mju.route.client;

import edu.mju.route.vo.ClientSpot;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 *远程调用类
 */
@Component //定义组件,让spring可以扫描到
@FeignClient(name = "service-scenic")  //指明远程调用模块名
public interface ScenicClient {
    /**
     * 调用远程接口 根据id查询景点信息
     * @param id 景点id
     * @return 封装的数据
     */
    @GetMapping("/scenic/spot/getSpotInfo/{id}")
    ClientSpot getSpotInfo(@ApiParam(name = "id" ,value = "景点id" ,required = true) @PathVariable Integer id);
}
